<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title><spring:message code="system.edit"/></title>
 	<%@ include file="../../../layout/admin_header.jsp"%>
 	<script src="../../js/category.js"></script>
</head>

<body>

    <div id="wrapper">
        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header"><spring:message code="system.edit"/></h1>
                </div>
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <spring:message code="system.edit"/>
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6">
                                    <form role="form" action="edit" method="post">
                                    	<input name="catid" id="catid" type="hidden" value="${category.getId()}"/>
                                        <div class="form-group">
                                            <label><spring:message code="category.code"/></label>
                                            <input class="form-control" name="catcode" id="catcode" placeholder="Enter code" value="${category.getCode()}">
                                        </div>
                                        <div class="form-group">
                                            <label><spring:message code="category.name"/></label>
                                            <input class="form-control" name="catname" id="catname" placeholder="Enter name" value="${category.getName()}">
                                        </div>
                                        <div class="form-group">
                                            <label><spring:message code="category.description"/></label>
                                            <textarea class="form-control" name="catdescription" id="catdescription" rows="3">${category.getDescription()}</textarea>
                                        </div>
                                        <button type="submit" class="btn btn-default"><spring:message code="system.submit"/></button>
                                        <button type="button" onclick="goBack()" class="btn btn-default"><spring:message code="system.cancel"/></button>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script>
	CKEDITOR.replace( 'catdescription' );
</script>
</html>
